<template>
  <div>父组件</div>
  <h3>msg:{{ msg }}</h3>
  <button @click="msg += '==='">更新数据</button>
  <hr />
  <!-- msg 用了props接受，msg2用了attrs -->
  <Child :msg="msg" :msg2="'hello'" @emitXXX="emitXXX" />
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import Child from "./components/Child.vue";
export default defineComponent({
  name: "App",
  components: {
    Child,
  },
  setup() {
    const msg = ref("游建忠游建忠");
    const emitXXX = (xxxx: string) => {
      console.log("simple vue3", xxxx);
    };
    return {
      msg,
      emitXXX,
    };
  },
});
</script>

<style>
</style>
